package cn.sdormitory.workflow.service;

import cn.sdormitory.workflow.entity.StudentsViolationApply;
import cn.sdormitory.workflow.entity.ViolationApply;
import cn.sdormitory.workflow.vo.WorkFlowVO;
import com.baomidou.mybatisplus.core.metadata.IPage;

import java.util.List;
import java.util.Map;

public interface ViolationApplyService {
    /**
     * 查询自己提交的申请单
     * @param apply
     * @return
     */
    IPage<ViolationApply> pageList(ViolationApply apply);

    /**
     * 创建申请单
     * @param applyList
     * @return
     */
    int createApply(List<StudentsViolationApply> applyList);

    /**
     * 撤销申请单
     * @param apply
     * @return
     */
    Boolean revokeApply(ViolationApply apply);

    /**
     * 查询审批历史
     * @param vo
     * @return
     */
    IPage<ViolationApply> findHistoryApproval(WorkFlowVO vo);

    /**
     * 设置审批人
     * @param
     */
    void setApprover(WorkFlowVO vo);

    void processResult(WorkFlowVO vo);

    /**
     * 查询申请单详情
     * @param apply
     * @return
     */
    ViolationApply applyDetail(ViolationApply apply);
    
    /**
     * 根据事件范围获取宿舍违纪数据
     * @author alex
     * @param: startDate
     * @param: endDate
     * @date 2024/11/15 10:04
     * @return
     */
    List<Map<String, String>> getViolationStatistics(String startDate, String endDate);
    
    /**
     * 获取违纪详情
     * @author alex
     * @param: startDate
     * @param: endDate
     * @param: sdId
     * @date 2024/11/15 15:55
     * @return
     */
    List<ViolationApply> getViolationStatisticsDetail(String startDate, String endDate, String sdId);
	
    // 获取已处理申请单
	IPage<ViolationApply> getProcessedPageList(ViolationApply vo);
 
}
